package com.example.home.viewmodel

import com.example.base.base.mvi.IUiState
import com.example.home.bean.respose.Marker
import com.example.home.bean.respose.MarkerCard

/**
 * @Description
 * @department 城市元宇宙组
 * @Author niushilong
 * @Date 2024-04-06 14:07
 */
data class HomeState (
    val markerUiState: MarkerUiState,
    val markerCardState: MarkerCardState,
    val loadUiState: LoadUiState
): IUiState

sealed class LoadUiState{
    object Idle: LoadUiState()  // 默认空闲
    data class Loading(var isShow: Boolean): LoadUiState()  // 是否显示加载
    object ShowContent: LoadUiState()   // 展示布局
    data class Error(val msg: String): LoadUiState()    //失败
}

sealed class MarkerUiState{
    object INIT: MarkerUiState()    // 初始化
    data class SUCCESS(val markers: List<Marker>): MarkerUiState()
}

sealed class MarkerCardState{
    object INIT: MarkerCardState()
    data class SUCCESS(val markerCards: List<MarkerCard>): MarkerCardState()
}


